{template 'public/header'}

{template 'public/comhead'}
<link rel="stylesheet" type="text/css" href="../addons/zh_tcwq/template/public/ygcss.css">
<ul class="nav nav-tabs">    
  <span class="ygxian"></span>
  <div class="ygdangq">当前位置:</div>
  <li ><a href="{php echo $this->createWebUrl2('sjgoods');}">商品列表</a></li>
  <li class="active"><a href="">添加商品</a></li>
</ul>
<div class="main ygmain">
  <form action="" method="post" class="form-horizontal form" enctype="multipart/form-data">
    <div class="panel panel-default ygdefault">
      <div class="panel-heading wyheader">
        商品信息
      </div>
      <div class="panel-body">

        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品名称</label>
          <div class="col-sm-9">
            <input type="text" name="goods_name" class="form-control" value="{$info['goods_name']}" />
          </div>
        </div>

        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品价格</label>
          <div class="col-sm-9">
            <input type="text" name="goods_cost" class="form-control" value="{$info['goods_cost']}" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">库存</label>
          <div class="col-sm-9">
            <input type="text" name="goods_num" class="form-control" value="{$info['goods_num']}" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">运费</label>
          <div class="col-sm-9">
            <input type="text" name="freight" class="form-control" value="{$info['freight']}" />
          </div>
        </div>
        <div class="form-group">
          <label class="col-xs-12 col-sm-3 col-md-2 control-label">关于发货</label>
          <div class="col-sm-9">
           <textarea name="delivery" class="form-control" cols="30" rows="7">{$info['delivery']}</textarea>
         </div>
       </div>


       
       <div class="form-group">
        <label for="lastname" class="col-sm-2 control-label">商品标签</label>
        <div class="col-sm-10">
          <label class="checkbox-inline">
            {if $info['quality']==1}  
            <input type="checkbox" name="quality" id="optionsRadios3" value="1" checked> 正品保证
            {else}
            <input type="checkbox" name="quality" id="optionsRadios3" value="1" > 正品保证
            {/if}
          </label>
          <label class="checkbox-inline">
            {if $info['free']==1}  
            <input type="checkbox" name="free" id="optionsRadios4"  value="1" checked> 全程包邮
            {else}
            <input type="checkbox" name="free" id="optionsRadios4"  value="1"> 全程包邮
            {/if}
          </label>
          <label class="checkbox-inline">
            {if $info['all_day']==1}  
            <input type="checkbox" name="all_day" id="optionsRadios4"  value="1" checked> 24小时发货
            {else}
            <input type="checkbox" name="all_day" id="optionsRadios4"  value="1" > 24小时发货
            {/if}
          </label>
          <label class="checkbox-inline">
            {if $info['service']==1}  
            <input type="checkbox" name="service" id="optionsRadios4"  value="1" checked> 售后保障
            {else}
            <input type="checkbox" name="service" id="optionsRadios4"  value="1" > 售后保障
            {/if}
          </label>
          <label class="checkbox-inline">
           {if $info['refund']==1}  
           <input type="checkbox" name="refund" id="optionsRadios4"  value="1" checked> 极速退款
           {else}
           <input type="checkbox" name="refund" id="optionsRadios4"  value="1" > 极速退款
           {/if}
         </label>
         <label class="checkbox-inline">
          {if $info['weeks']==1}  
          <input type="checkbox" name="weeks" id="optionsRadios4"  value="1" checked> 七天包退
          {else}
          <input type="checkbox" name="weeks" id="optionsRadios4"  value="1" > 七天包退
          {/if}
        </label>

      </div>
    </div>
    
    <div class="form-group">
      <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品轮播图</label>
      <div class="col-sm-9">
       {php echo tpl_form_field_multi_image('lb_imgs',$lb_imgs);}
     </div>
   </div>

   <div class="form-group">
    <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品详情</label>
    <div class="col-sm-9">
     <textarea name="goods_details" class="form-control" cols="30" rows="7">{$info['goods_details']}</textarea>
   </div>
 </div>

 <div class="form-group">
  <label class="col-xs-12 col-sm-3 col-md-2 control-label">商品介绍图</label>
  <div class="col-sm-9">
   {php echo tpl_form_field_multi_image('imgs',$imgs);}
 </div>
</div>


</div>

</div>

<div class="form-group">

  <input type="submit" name="submit" value="修改" class="btn col-lg-3" style="color: white;background-color: #44ABF7;"/>

  <input type="hidden" name="token" value="{$_W['token']}" />
  <input type="hidden" name="id" value="{$info['id']}" />

</div>

</form>

</div>
<script type="text/javascript">
  $(function(){
    $("#frame-1").show();
    $("#yframe-1").addClass("wyactive");
  })
</script>